<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsAlbumTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods_album', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('goods_id')->comment('商品id');
            $table->string('album_image')->default('')->comment('图片大图路径');
            $table->string('album_thumb')->default('')->comment('图片缩略图');
            $table->tinyInteger('album_status')->default(1)->comment('图片状态1正常-1删除');
            $table->index('goods_id');
            $table->index('album_status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('goods_album');
    }
}
